//
//  FlagSubView.m
//  PickerView
//
//  Created by cocoazxj@163.com on 15/4/1.
//  Copyright (c) 2015年 handcool. All rights reserved.
//

#import "FlagSubView.h"

@interface FlagSubView()
@property (nonatomic, strong) IBOutlet UILabel *country;
@property (nonatomic, strong) IBOutlet UIImageView *flag;
@end
@implementation FlagSubView
+ (instancetype)flagSubView
{
    FlagSubView *v = [[[NSBundle mainBundle] loadNibNamed:@"FlagSubView" owner:self options:nil] firstObject];
    return v;
}

- (void)setFlagM:(FlagModel *)flagM
{
    _flagM = flagM;
    self.country.text = flagM.name;
    self.flag.image = [UIImage imageNamed:flagM.icon];
}
@end
